<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>
<html>
<head>
<title>添加新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script type="text/javascript" src="/js/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="/js/jscripts/tiny_mce/button_style/default.js"></script>
<html:javascript formName="newsForm"/>
<script language="javascript" type="text/javascript">
tinyMCE.init(getDefaultButtonStyle("content"));
/* tinyMCE.init({
	language : "zh_cn",
	mode : "textareas",
	theme : "advanced",
	width : "80%",
	plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
	theme_advanced_buttons1_add_before : "save,separator",
	theme_advanced_buttons1_add : "fontselect,fontsizeselect",
	theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
	theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
	theme_advanced_buttons3_add_before : "tablecontrols,separator",
	theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	plugin_insertdate_dateFormat : "%Y-%m-%d",
	plugin_insertdate_timeFormat : "%H:%M:%S",
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
	external_link_list_url : "example_data/example_link_list.js",
	external_image_list_url : "example_data/example_image_list.js",
	flash_external_list_url : "example_data/example_flash_list.js"
}); */

</script>
<script language="javascript" type="text/javascript">
	function checkForm(){
		setTimeout("SendForm()",50);
		return false;
	}
	function SendForm(){
		if (document.newsForm.title.value==""){
		alert("标题不能为空！");
		return;
		}
	    if (document.newsForm.link.value==""){
		alert("链接地址不能为空！");
		return;
		} 
		if(document.newsForm.content.value==""){
		alert("新闻内容不能为空！");
		return;
		}

	document.newsForm.submit();
	}
</script>
<html:javascript formName="newsForm"/>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<html:form action="/cms/news/newsManage" method="post" onsubmit="return checkForm();">
<html:hidden property="newsId"/>
<html:hidden property="createTime"/>
<html:hidden property="click"/>
<html:hidden property="createUserId"/>
<html:hidden property="lastUpdateUserId"/>
<input type="hidden" name="method" value="add">
  <table width="90%" border="0" cellspacing="2" cellpadding="3" align="center">
    <tr bgcolor="#ffbe26"> 
      <td colspan="2"><strong><font color="#000000">添加新闻</font></strong></td>
    </tr>
   <tr bgcolor="f5f5f5"> 
      <td width="25%"><div id="title" align="right">新闻专题</div></td>
      <td width="75%"><html:select styleId="featureId" property="featureId">
      		<html:options collection="features" property="featureId" labelProperty="name"/>
      	</html:select>
	  </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%"><div align="right">新闻标题<font color="#FF0000">*</font></div></td>
      <td width="75%"><html:text property="title" size="50" maxlength="40"/><html:errors property="name"/></td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%"><div align="right">作者</div></td>
      <td width="75%"><html:text property="writer" size="20" maxlength="30"/></td>
    </tr>
	<tr bgcolor="f5f5f5"> 
      <td width="25%"><div align="right">资讯来源 </div></td>
      <td width="75%"><html:text property="source" size="50" maxlength="30"/></td>
    </tr>
	<tr bgcolor="f5f5f5"> 
      <td width="25%"><div id="link" align="right">链接<font color="#FF0000">*</font></div></td>
      <td width="75%"><html:text property="link" size="50" maxlength="300" /></td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%"><div align="right">备注</div></td>
      <td width="75%"><html:text property="remark"/></td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%" valign="top"><div align="right">新闻内容<font color="#FF0000">*</font></div></td>
      <td width="75%"><html:textarea property="content"></html:textarea></td>
	</tr>
    <tr bgcolor="f5f5f5"> 
      <td colspan="2"><div align="center"> 
          <input type="submit" name="SYS_SET" value=" 确 认 " class="frm_btn" >
          &nbsp;&nbsp;<input type="button" name="Button" value=" 返 回" class="frm_btn" onclick="javascript:history.back()">
        </div></td>
    </tr>
	
  </table>
</html:form>
</body>
</html>